from django.urls import path
from . import views
from .views import BankCardListView, BankCardDeleteView,BankCardSetDefaultView, ChefWalletCreateView,ChefWithdrawalInfoView, ChefWalletView, ChefWithdrawalHistoryView, ChefWithdrawalView, VdjChefWalletListView, VdjChefWithdrawalListView, VdjChefWithdrawalProcessView


app_name = 'payments'

urlpatterns = [
    # path('', views.PaymentCreateView.as_view(), name='payment-create'),
    # path('<int:pk>/', views.PaymentDetailView.as_view(), name='payment-detail'),
    # path('refunds/', views.RefundCreateView.as_view(), name='refund-create'),
    #厨师端
        #添加银行卡
    path('bankcards/', BankCardListView.as_view(), name='chef-bankcard'),
        #获取银行卡信息
    path('bankcardslist/', BankCardListView.as_view(), name='chef-bankcard'),
        # 设置默认卡（单独视图处理）
    path('bankcards/<int:pk>/set_default/', BankCardSetDefaultView.as_view(), name='bankcard-set-default'),
        # 删除银行卡（单独视图处理）
    path('bankcards/<int:pk>/', BankCardDeleteView.as_view(), name='bankcard-delete'),
    path('chef/wallet/', ChefWalletView.as_view(), name='chef-wallet'),
        #POST请求URL（提交提现申请）
    path('chef/withdrawals/', ChefWithdrawalView.as_view(), name='chef-withdraw'),
        # GET请求URL（查询提现记录）
    path('chef/withdrawals/list/', ChefWithdrawalHistoryView.as_view(), name='withdrawal-list'),
        #开通钱包接口ChefWalletCreateView
    path('chef/wallet/create/', ChefWalletCreateView.as_view(), name='chef-wallet-create'),
        # 提现历史记录接口：GET /api/payments/withdrawals/history/
    path('withdrawals/history/', ChefWithdrawalHistoryView.as_view(), name='withdrawal-history'),
        #提现页面的钱包信息获取
    path('withdrawals/info/', ChefWithdrawalInfoView.as_view(), name='chef-withdrawal-info'),

    # 管理系统路由
    path('vdj-chef-withdrawals/', VdjChefWithdrawalListView.as_view(), name='vdj-chef-withdrawals'),
    path('vdj-chef-withdrawals/<int:pk>/process/', VdjChefWithdrawalProcessView.as_view(), name='vdj-chef-withdrawal-process'),
    path('vdj-chef-wallets/', VdjChefWalletListView.as_view(), name='vdj-chef-wallets'),
]